package com.qing.transfomer.client;

import com.qing.transfomer.dto.mapping.QingFlowResponseDTO;
import com.qing.transfomer.dto.qing.ApplyFilterRequestDTO;
import com.qing.transfomer.dto.qing.ApplyFilterResultDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

import java.net.URI;

@FeignClient(name = "qingFlowClient", url = "http://localhost")
public interface QingFlowClient {
    /**
     * 获取应用数据列表
     *
     * @param url
     * @param accessToken
     * @param requestDTO
     * @return
     */
    @PostMapping(headers = "Content-Type=application/json")
    QingFlowResponseDTO<ApplyFilterResultDTO> applyFilter(URI url, @RequestHeader("accessToken") String accessToken, @RequestBody ApplyFilterRequestDTO requestDTO);

}